<!DOCTYPE html>
<html>
 <head> 
  <meta charset="utf-8" /> 
  <meta name="renderer" content="webkit|ie-comp|ie-stand" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 
  <meta http-equiv="Cache-Control" content="no-siteapp" /> 
  <title>SFDP 超级表单开发平台V3.0</title> 
 </head> 
 <body> 
  <link rel="stylesheet" href="__SFDP__/css/sfdp.desc.css" /> 
  <link rel="stylesheet" href="__SFDP__/css/sfdp.common.css" /> 
  <div class="page-container"> 
   <div class="fb-main"> 
    <ul style="list-style: none;padding: 0 0 0 20px;border-bottom: 1px solid #ccc;display: block;">
     <li><h3>SFDP 超级表单开发平台—V3.0</h3></li>
    </ul> 
    <div class="fb-left"> 
     <ul class="fb-ul">
      <li class="active">设计控制区 Design control area</li>
     </ul> 
     <div class="fb-content"> 
      <div class="section"> 
       <a class="fb-button" onclick="showLayer('config',1,0)"><img src='__SFDP__/images/set.png'> 配置</a> 
       <a class="fb-button" id='save'><img src='__SFDP__/images/help.png'> 保存</a> 
       <a class="fb-button" onclick="showLayer('view',1,0)"><img src='__SFDP__/images/help.png'> 预览</a> 
       <a class="fb-button"><img src='__SFDP__/images/help.png'> 帮助 </a>
      </div> 
     </div> 
	 <ul class="fb-ul">
      <li class="active">页面布局 Form control library</li>
     </ul>
	  <div class="fb-content"> 
      <div class="section"> 
       <a class="fb-button" onclick="addtr(1)"><img src='__SFDP__/images/table.png'> 一格 </a> 
       <a class="fb-button" onclick="addtr(2)"><img src='__SFDP__/images/table.png'> 二格 </a> 
       <a class="fb-button" onclick="addtr(3)"><img src='__SFDP__/images/table.png'> 三格 </a> 
       <a class="fb-button" onclick="addtr(4)"><img src='__SFDP__/images/table.png'> 四格 </a> 
      </div> 
     </div> 
     <ul class="fb-ul">
      <li class="active">表单控件库 Form control library</li>
     </ul> 
     <div class="fb-content"> 
      <div class="section"> 
		  <a data="text" class="fb-button fbtd"><img src='__SFDP__/images/text.png'> 文本 </a> 
		   <a data="checkboxes" class="fb-button fbtd"><img src='__SFDP__/images/checkboxes.png'>多选框</a> 
		   <a data="radio" class="fb-button fbtd"><img src='__SFDP__/images/radio.png'>单选框</a> 
		   <a data="dropdown" class="fb-button fbtd"><img src='__SFDP__/images/dropdown.png'> 下拉 </a> 
		   <a data="date" class="fb-button fbtd"><img src='__SFDP__/images/time.png'> 日期时间</a> 
		   <a data="textarea" class="fb-button fbtd"><img src='__SFDP__/images/textarea.png'> 多行文本</a> 
		   <a data="html" class="fb-button fbtd"><img src='__SFDP__/images/html.png'> Html控件</a> 
		   <a data="wenzi" class="fb-button fbtd"><img src='__SFDP__/images/text.png'> 文字显示</a> 
		   <a data="upload" class="fb-button fbtd"><img src='__SFDP__/images/upload.png'> 上传组件</a> 
      </div> 
     </div> 
    </div> 
    <div class="fb-center" style="padding-top: 0px; "> 
     <table id="table_center"> 
      <tbody> 
       <tr class="table_tr">
        <th  colspan="4">正在设计：<b id="fb_name"></b></th>
       </tr> 
      </tbody> 
     </table> 
    </div> 
    <div class="fb-right"> 
     <ul class="fb-ul">
      <li class="active">日志输出区 Logs Out</li>
     </ul> 
     <div id="logout" class="logout"></div> 
    </div> 
   </div> 
  </div>
  <style>

  </style>
<div class="tpfd-pop" id="pop">
	<div class="tpfd-wrap">
	<div style='font-size: 16px;font-weight: 800;'>表单设置 <span id="zd_id"></span>
	<input id="showtype" type="hidden" value="other">
	</div>
		<span class="tpfd-close">X</span>
			<form id="myform">  
		<div class="tpfd-content" id='table'>
		</div>
		</form>  
		<button class="tpfd-ok">保 存</button>
	</div>
</div>
 </body>
</html>
<script>
//全局变量、锁定数据库名称不允许修改
var look_db = {$look};
</script>
	<script src="__SFDP__/lib/jquery-1.12.4.js"></script>
	<script src="__SFDP__/lib/jquery-ui.js"></script>
	<script src="__SFDP__/lib/layer/2.4/layer.js"></script>
	<script src="__SFDP__/js/sfdp.fun.js"></script>
	<script src="__SFDP__/js/sfdp.unit.js"></script>
	<script src="__SFDP__/sfdp.3.0.js"></script>
	<script src="__SFDP__/js/sfdp.view.js"></script>
	<script src="__SFDP__/js/sfdp.field.js"></script>
   <script>
   
  $( function() {
		//初始化设计数据
		int_data({$json|raw});
		//设置拖拽单元属性
		$( ".fbtd" ).draggable({
		  connectToSortable: ".fb-fz",
		  helper: "clone",
		  revert: "invalid",
		  cursor: "move"
		});
		$( "#fb-fz" ).sortable({
		  cancel: ".fb-disabled"
		});
	});
	$("#save").click(function(){
		var int_data = localStorage.getItem("json_data");
		 var id='{$fid}';
		$.ajax({  
			 url:'{:url("/index/sfdp/sfdp_desc_save")}',
			 data:{ziduan:int_data,id:id},  
			 type:'post',  
			 cache:true,  
			dataType:'json',			 
			 success:function(data) {  
				if(data.code==0){
					commonfun.ShowTip('success');
				}
			  },  
			  error : function() {  
			  }  
		 }); 
		})
  </script>

